import request from '@/utils/request'
const baseUrl = '/user-function-bankcards/bankcards'
export const binding = (BIndDto, cardnumber) => {
  return request({
    url: baseUrl + '/bind',
    method: 'post',
    data: BIndDto,
    params: {
      cardnumber: cardnumber,
    },
  })
}

export const getlist = phone => {
  return request({
    url: baseUrl + '/list',
    method: 'get',
    params: {
      phone: phone,
    },
  })
}
export const zhuanchu1 = (cards, cardnumber) => {
  return request({
    url: baseUrl + '/transfer',
    method: 'put',
    params: {
      cardnumber: cardnumber,
    },
    data: cards,
  })
}
export const cardsole = cardnumber => {
  return request({
    url: baseUrl + '/cardsole?cardnumber=' + cardnumber,
    method: 'get',
  })
}

export const checkpass = (cardnumber, password) => {
  return request({
    url:
      baseUrl + '/checkPass?cardnumber=' + cardnumber + '&password=' + password,
    method: 'get',
  })
}
export const opencard = (Bankcard, uid) => {
  return request({
    url: baseUrl + '/opencard',
    method: 'post',
    data: Bankcard,
    params: {
      uid: uid,
    },
  })
}
